#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main()

{
	int h = 0;
	scanf("%d", &h);//height

	int arr[50][50];
	for (int i = 0; i < h; i++) {
		arr[i][0] = 1;
		arr[i][i] = 1;
		if (i >= 2) {
			for (int j = 1; j < i; j++) {
				arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
			}
		}
	}

	for (int i = 0; i < h; i++) {
		for (int j = 0; j <= i; j++) {
			printf("%d ", arr[i][j]);
		}
		printf("\n");
	}

    return 0;
}